const puppeteer = require('puppeteer');
const option_window = {
    width: 432,
    height: 586
};
(async () => {
  const browser = await puppeteer.launch({
    defaultViewport: option_window
  });
  const page = await browser.newPage();
  await page.goto('http://127.0.0.1:8080/template/poster_01.html', {waitUtil: "networkidle0"});
  await page.screenshot({path: 'example.png'});
  await page.screenshot({path: 'example.jpg', type: 'jpeg', quality: 100});
  await browser.close();
})();